<form role="form" action="" class="frm-operate" method="post">
    <div class="card shadow-none">
        <div class="card-body">
            <div class="form-group row">
                <label class="col-sm-2 row-form-label">{:lang("Type")}</label>
                <div class="col-sm-8">
                    {:build_radios('row[type]',['1'=>lang('Menu'),'0'=>lang('Authentication'),'2'=>lang('Extra menu')])}
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-parent_id" class="col-sm-2 row-form-label">{:lang("Superior")}</label>
                <div class="col-sm-8">
                    {:build_select('row[parent_id]',$option,$parent_id,['id'=>'frm-parent_id','class'=>'form-control'])}
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-title" class="col-sm-2 row-form-label">{:lang("Title")}</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-title" name="row[title]" placeholder="{:lang("Title")}" data-rule="required">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-name" class="col-sm-2 row-form-label">{:lang("Rule")}</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-name" name="row[name]" placeholder="{:lang("Rule")}" data-rule="required">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-route" class="col-sm-2 row-form-label">{:lang("Routing")}</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-route" name="row[route]" placeholder="">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-icon" class="col-sm-2 row-form-label">{:lang("Icon")}</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-icon" name="row[icon]" placeholder="{:lang("Icon")}" value="fas fa-circle">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-weigh" class="col-sm-2 row-form-label">{:lang("Weigh")}</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-weigh" name="row[weigh]" placeholder="{:lang("Weigh")}" value="0">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-condition" class="col-sm-2 row-form-label">{:lang("Additional conditions")}</label>
                <div class="col-sm-8">
                    <textarea class="form-control" id="frm-condition" name="row[condition]" rows="3" placeholder="{:lang("Additional conditions")}"></textarea>
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-remark" class="col-sm-2 row-form-label">{:lang("Remarks")}</label>
                <div class="col-sm-8">
                    <textarea class="form-control" id="frm-remark" name="row[remark]" rows="3" placeholder="{:lang("Remarks")}"></textarea>
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-2 row-form-label">{:lang("Status")}</label>
                <div class="col-sm-8">
                    {:build_radios('row[status]',['normal'=>lang('Normal'),'hidden'=>lang('Hidden')])}
                </div>
            </div>
        </div>
        <div class="card-footer">
            <div class="row justify-content-around">
                <div class="col-sm-8">
                    <button type="submit" class="btn btn-primary btn-submit">{:lang('Submit')}</button>
                    <button type="reset" class="btn btn-default">{:lang('Reset')}</button>
                </div>
            </div>
        </div>
    </div>
</form>

{block:script}
<script>
    require(['admin','form'], function (undefined,Form) {
        Form.api.init({success:function (data) {}});
    })
</script>
{/block:script}

